﻿using System;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using OfficeOpenXml.Table;

namespace NP.BPMReportPlatform.UserTrial.Dto
{
    [ExcelExporter(Name = "报表数据", TableStyle = TableStyles.Light10, AutoFitAllColumn = true)]
    public class GetTrainTaskOutput
    {
        /// <summary>
        /// 培训年月
        /// </summary>
        [IEIgnore]
        public string CourseTrainTaskId { get; set; }

        /// <summary>
        /// 流程号
        /// </summary>
        [ExporterHeader(DisplayName = "流程号")]
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 培训编码
        /// </summary>
        [ExporterHeader(DisplayName = "培训编码")]
        public string CourseTrainCode { get; set; }

        /// <summary>
        /// ILearning活动编码
        /// </summary>
        [ExporterHeader(DisplayName = "ILearning活动编码")]
        public string ILearningCode { get; set; }

        /// <summary>
        /// 经办人姓名
        /// </summary>
        [ExporterHeader(DisplayName = "经办人姓名")]
        public string CreateUserName { get; set; }

        /// <summary>
        /// 经办人工号
        /// </summary>
        [ExporterHeader(DisplayName = "经办人工号")]
        public string CreateUserWorkNumber { get; set; }

        /// <summary>
        /// 任务状态
        /// </summary>
        [ExporterHeader(DisplayName = "任务状态")]
        public string StatusName { get; set; }

        /// <summary>
        /// 所属公司
        /// </summary>
        [ExporterHeader(DisplayName = "经办人公司")]
        public string Company { get; set; }

        /// <summary>
        /// 所属部门
        /// </summary>
        [ExporterHeader(DisplayName = "经办人部门")]
        public string DepartMent { get; set; }

        /// <summary>
        /// 培训年月
        /// </summary>
        [IEIgnore]
        public DateTime? TrainDate { get; set; }

        /// <summary>
        /// 培训年月
        /// </summary>
        [ExporterHeader(DisplayName = "培训年月")]
        public string TrainDateFormat
        {
            get
            {
                return this.TrainDate?.ToString("yyyy年MM月");
            }
        }

        /// <summary>
        /// 培训项目
        /// </summary>
        [ExporterHeader(DisplayName = "培训项目")]
        public string ProjectName { get; set; }

        /// <summary>
        /// 培训课程
        /// </summary>
        [ExporterHeader(DisplayName = "培训课程")]
        public string CourseName { get; set; }

        /// <summary>
        /// 授课方式
        /// </summary>
        [ExporterHeader(DisplayName = "授课方式")]
        public string TechMethod { get; set; }

        /// <summary>
        /// 课程类型
        /// </summary>
        [ExporterHeader(DisplayName = "课程类型")]
        public string CourseType { get; set; }

        /// <summary>
        /// 培训对象
        /// </summary>
        [ExporterHeader(DisplayName = "培训对象")]
        public string TraningTarget { get; set; }

        /// <summary>
        /// 预算
        /// </summary>        
        [ExporterHeader(DisplayName = "预算")]
        public decimal? TrainUserBudget { get; set; }

        /// <summary>
        /// 课时
        /// </summary>
        [ExporterHeader(DisplayName = "课时")]
        public string CoursePeriod { get; set; }

        /// <summary>
        /// 人数
        /// </summary>
        [ExporterHeader(DisplayName = "人数")]
        public int? TrainUserNumber { get; set; }

        /// <summary>
        /// 讲师类型
        /// </summary>
        [ExporterHeader(DisplayName = "讲师类型")]
        public string Instructor { get; set; }

        /// <summary>
        /// 培训开始时间
        /// </summary>
        [IEIgnore]
        public DateTime? BeginTime { get; set; }

        /// <summary>
        /// 培训年月
        /// </summary>
        [ExporterHeader(DisplayName = "培训开始时间")]
        public string BeginTimeFormat
        {
            get
            {
                return this.BeginTime?.ToString("yyyy年MM月dd日");
            }
        }

        /// <summary>
        /// 培训结束时间
        /// </summary>
        [IEIgnore]
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 培训结束时间
        /// </summary>
        [ExporterHeader(DisplayName = "培训结束时间")]
        public string EndTimeFormat
        {
            get
            {
                return this.EndTime?.ToString("yyyy年MM月dd日");
            }
        }

        /// <summary>
        /// 是否享受差旅津贴
        /// </summary>
        [IEIgnore]
        public bool? IfAllowance { get; set; }

        /// <summary>
        /// 是否享受差旅津贴
        /// </summary>
        [ExporterHeader(DisplayName = "是否享受差旅津贴")]
        public string IfAllowanceFormat
        {
            get
            {
                return this.IfAllowance == true ? "是" : "否";
            }
        }

        /// <summary>
        /// 是否获得证书
        /// </summary>
        [IEIgnore]
        public bool? IsObtainCert { get; set; }

        /// <summary>
        /// 是否享受差旅津贴
        /// </summary>
        [ExporterHeader(DisplayName = "是否获得证书")]
        public string IsObtainCertFormat
        {
            get
            {
                return this.IsObtainCert == true ? "是" : "否";
            }
        }
    }
}